<template>
	<div class="app-user">
		<div class="app-user-title">{{title}}</div>

		<div class="app-user-action" @click="onTapLoginOut">
			<!-- <span><u-icon name="account" color="#274cda" size="23" /></span> 切换账号 -->
		</div>
	</div>
</template>

<script>
	export default {
		name: "userBox",
		props: {
			title: {
				type: String,
				default: ''
			},
		},
		data() {
			return {

			};
		},
		methods: {
			onTapLoginOut() {
				uni.removeStorageSync("RONIN-TOKEN");
				uni.removeStorageSync("RONINURL");
				uni.removeStorageSync("RONIN-USER");

				uni.redirectTo({
					url: "/mine/register/register"
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.app-user {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 40rpx 20rpx;

		&-title {
			font-size: 36rpx;
			font-weight: bold;
		}

		&-action {
			display: flex;
			align-items: center;
			font-size: 28rpx;

			span {
				font-size: 32rpx;
				margin-right: 16rpx;
				font-weight: bold;
				margin-top: 4rpx;
			}

			color: #274cda;
		}
	}
</style>